package com.htpay.util.sms;

import com.htpay.model.common.Constant;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;

/**
 * 描述:
 * <p>
 * 短信平台封装
 */
@Slf4j
@Configurable
public class SmsHelperUtil {

    /**
     * 发送短信到平台
     *
     * @param phone
     * @param code
     * @return
     */
    public static boolean send(String phone, String code, String platform) throws Exception {
        log.info("====发送短信平台【" + platform + "】=====");
        if (Constant.SMS_PLAT_FORM_CHUANG_RUI.equals(platform)) {
            return ChuangRuiSmsUtil.send(phone, code);
        }
        return false;
    }
}
